<template>
    <div class="app-container">
        <div class="Search">
            <!--工具条-->
            <el-col :span="24" class="toolbar" style="padding-bottom: 0px;">
                <el-form :inline="true" :model="query">
                                                     <el-form-item v-has="'PLATFROM_TENANT_QUERY'">
                <el-cascader  ref="tenantTree" placeholder="所属租户" :props="tenantProps" :options="tenantOptions" @change="selectTenant" clearable collapse-tags filterable></el-cascader>
            </el-form-item>

             <el-form-item>
                 <el-cascader ref="organTree" placeholder="所属组织" :props="props" :options="organOptions" @change="selectOrgan" collapse-tags clearable filterable></el-cascader>
            </el-form-item>
                        <el-form-item>
    <el-input v-model="query.params.appId" placeholder="应用编号" />
</el-form-item>
                                                                                        <el-form-item>
    <el-input v-model="query.params.mchId" placeholder="商户编号" />
</el-form-item>
                                <el-form-item>
    <el-date-picker v-model="query.params.createtTime" type="date" placeholder="订单生成时间">
    </el-date-picker>
</el-form-item>
                <el-form-item>
    <el-date-picker v-model="query.params.createtTime" type="date" placeholder="订单生成时间">
    </el-date-picker>
</el-form-item>
                                                <el-form-item>
    <el-date-picker v-model="query.params.timeEnd" type="date" placeholder="订单结束时间">
    </el-date-picker>
</el-form-item>
                <el-form-item>
    <el-date-picker v-model="query.params.timeEnd" type="date" placeholder="订单结束时间">
    </el-date-picker>
</el-form-item>
                                                                <el-form-item>
    <el-select v-model="query.params.amount" placeholder="订单金额">
        <el-option
                v-for="item in query.options"
                :key="item.value"
                :label="item.label"
                :value="item.value">
        </el-option>
    </el-select>
</el-form-item>
                                                        <el-form-item>
    <el-select v-model="query.params.status" placeholder="订单状态">
        <el-option
                v-for="item in query.options"
                :key="item.value"
                :label="item.label"
                :value="item.value">
        </el-option>
    </el-select>
</el-form-item>
                                <el-form-item>
    <el-input v-model="query.params.bankType" placeholder="银行类型" />
</el-form-item>
                                                                                <el-form-item>
    <el-select v-model="query.params.cachFee" placeholder="现金金额">
        <el-option
                v-for="item in query.options"
                :key="item.value"
                :label="item.label"
                :value="item.value">
        </el-option>
    </el-select>
</el-form-item>
                                <el-form-item>
    <el-input v-model="query.params.cachFeeType" placeholder="现金类型" />
</el-form-item>
                                                                                <el-form-item>
    <el-select v-model="query.params.couponCount" placeholder="优惠券">
        <el-option
                v-for="item in query.options"
                :key="item.value"
                :label="item.label"
                :value="item.value">
        </el-option>
    </el-select>
</el-form-item>
                                                        <el-form-item>
    <el-select v-model="query.params.couponFee" placeholder="优惠券金额">
        <el-option
                v-for="item in query.options"
                :key="item.value"
                :label="item.label"
                :value="item.value">
        </el-option>
    </el-select>
</el-form-item>
                                                        <el-form-item>
    <el-select v-model="query.params.couponFee0" placeholder="优惠券金额">
        <el-option
                v-for="item in query.options"
                :key="item.value"
                :label="item.label"
                :value="item.value">
        </el-option>
    </el-select>
</el-form-item>
                                                        <el-form-item>
    <el-select v-model="query.params.couponFee1" placeholder="优惠券金额">
        <el-option
                v-for="item in query.options"
                :key="item.value"
                :label="item.label"
                :value="item.value">
        </el-option>
    </el-select>
</el-form-item>
                                                        <el-form-item>
    <el-select v-model="query.params.couponFee2" placeholder="优惠券金额">
        <el-option
                v-for="item in query.options"
                :key="item.value"
                :label="item.label"
                :value="item.value">
        </el-option>
    </el-select>
</el-form-item>
                                <el-form-item>
    <el-input v-model="query.params.deviceInfo" placeholder="设备信息" />
</el-form-item>
                                                        <el-form-item>
    <el-input v-model="query.params.errCodeDes" placeholder="错误码描述" />
</el-form-item>
                                                        <el-form-item>
    <el-input v-model="query.params.errCode" placeholder="错误码" />
</el-form-item>
                                                        <el-form-item>
    <el-input v-model="query.params.feeType" placeholder="费用类型" />
</el-form-item>
                                                        <el-form-item>
    <el-input v-model="query.params.isSubscribe" placeholder="是否支付后关注" />
</el-form-item>
                                                        <el-form-item>
    <el-input v-model="query.params.nonceStr" placeholder="随机字串" />
</el-form-item>
                                                                                        <el-form-item>
    <el-input v-model="query.params.objectId" placeholder="物品编号" />
</el-form-item>
                                                        <el-form-item>
    <el-input v-model="query.params.objectTypeId" placeholder="物品类型编号" />
</el-form-item>
                        <el-form-item>
    <el-input v-model="query.params.openid" placeholder="消费者编号" />
</el-form-item>
                                                                                        <el-form-item>
    <el-input v-model="query.params.outTradeNo" placeholder="微信订单编号" />
</el-form-item>
                        <el-form-item>
    <el-input v-model="query.params.resultCode" placeholder="结果码" />
</el-form-item>
                                                        <el-form-item>
    <el-input v-model="query.params.returnCode" placeholder="返回码编号" />
</el-form-item>
                                                        <el-form-item>
    <el-input v-model="query.params.returnMsg" placeholder="返回消息" />
</el-form-item>
                                                        <el-form-item>
    <el-input v-model="query.params.subAppid" placeholder="子应用编号" />
</el-form-item>
                                                        <el-form-item>
    <el-input v-model="query.params.subMchId" placeholder="子商户编号" />
</el-form-item>
                                                        <el-form-item>
    <el-input v-model="query.params.tradeType" placeholder="交易类型" />
</el-form-item>
                                                        <el-form-item>
    <el-input v-model="query.params.transactionId" placeholder="交易编号" />
</el-form-item>
                                                        <el-form-item>
    <el-input v-model="query.params.sign" placeholder="签名" />
</el-form-item>
                                                                                        <el-form-item>
    <el-input v-model="query.params.createBy" placeholder="生成者" />
</el-form-item>
                                                        <el-form-item>
    <el-input v-model="query.params.updateBy" placeholder="更新更" />
</el-form-item>
                                <el-form-item>
    <el-date-picker v-model="query.params.createDate" type="date" placeholder="生成时间">
    </el-date-picker>
</el-form-item>
                <el-form-item>
    <el-date-picker v-model="query.params.createDate" type="date" placeholder="生成时间">
    </el-date-picker>
</el-form-item>
                                                <el-form-item>
    <el-date-picker v-model="query.params.updateDate" type="date" placeholder="更新时间">
    </el-date-picker>
</el-form-item>
                <el-form-item>
    <el-date-picker v-model="query.params.updateDate" type="date" placeholder="更新时间">
    </el-date-picker>
</el-form-item>
                                        <el-form-item>
    <el-input v-model="query.params.remark" placeholder="备注：1：现金，2：红包，3：积分" />
</el-form-item>
                                            

<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="fetchData">查询</el-button>
</el-form-item>
<el-form-item>
<el-button type="success" icon="el-icon-plus" size="mini" @click="handleAdd">新增</el-button>
</el-form-item>
</el-form>
</el-col>
</div>

        <div class="block">
            <el-table
                    v-loading="listLoading"
                    :data="list"
                    element-loading-text="Loading"
                    border
                    fit
                    highlight-current-row
            >
                <el-table-column align="center" label="序号" width="95">
                    <template slot-scope="scope">
                        {{ scope.$index }}
                    </template>
                </el-table-column>

<el-table-column label="主键" width="110">
<template slot-scope="scope">
{{ scope.row.id }}
</template>
</el-table-column>
<el-table-column label="关联订单" width="110">
<template slot-scope="scope">
{{ scope.row.orderId }}
</template>
</el-table-column>
<el-table-column label="所属组织" width="110">
<template slot-scope="scope">
{{ scope.row.organId }}
</template>
</el-table-column>
<el-table-column label="应用编号" width="110">
<template slot-scope="scope">
{{ scope.row.appId }}
</template>
</el-table-column>
<el-table-column label="商户编号" width="110">
<template slot-scope="scope">
{{ scope.row.mchId }}
</template>
</el-table-column>
<el-table-column label="订单生成时间" width="110">
<template slot-scope="scope">
{{ scope.row.createtTime }}
</template>
</el-table-column>
<el-table-column label="订单结束时间" width="110">
<template slot-scope="scope">
{{ scope.row.timeEnd }}
</template>
</el-table-column>
<el-table-column label="订单金额" width="110">
<template slot-scope="scope">
{{ scope.row.amount }}
</template>
</el-table-column>
<el-table-column label="订单状态" width="110">
<template slot-scope="scope">
{{ scope.row.status }}
</template>
</el-table-column>
<el-table-column label="银行类型" width="110">
<template slot-scope="scope">
{{ scope.row.bankType }}
</template>
</el-table-column>
<el-table-column label="现金金额" width="110">
<template slot-scope="scope">
{{ scope.row.cachFee }}
</template>
</el-table-column>
<el-table-column label="现金类型" width="110">
<template slot-scope="scope">
{{ scope.row.cachFeeType }}
</template>
</el-table-column>
<el-table-column label="优惠券" width="110">
<template slot-scope="scope">
{{ scope.row.couponCount }}
</template>
</el-table-column>
<el-table-column label="优惠券金额" width="110">
<template slot-scope="scope">
{{ scope.row.couponFee }}
</template>
</el-table-column>
<el-table-column label="优惠券金额" width="110">
<template slot-scope="scope">
{{ scope.row.couponFee0 }}
</template>
</el-table-column>
<el-table-column label="优惠券金额" width="110">
<template slot-scope="scope">
{{ scope.row.couponFee1 }}
</template>
</el-table-column>
<el-table-column label="优惠券金额" width="110">
<template slot-scope="scope">
{{ scope.row.couponFee2 }}
</template>
</el-table-column>
<el-table-column label="设备信息" width="110">
<template slot-scope="scope">
{{ scope.row.deviceInfo }}
</template>
</el-table-column>
<el-table-column label="错误码描述" width="110">
<template slot-scope="scope">
{{ scope.row.errCodeDes }}
</template>
</el-table-column>
<el-table-column label="错误码" width="110">
<template slot-scope="scope">
{{ scope.row.errCode }}
</template>
</el-table-column>
<el-table-column label="费用类型" width="110">
<template slot-scope="scope">
{{ scope.row.feeType }}
</template>
</el-table-column>
<el-table-column label="是否支付后关注" width="110">
<template slot-scope="scope">
{{ scope.row.isSubscribe }}
</template>
</el-table-column>
<el-table-column label="随机字串" width="110">
<template slot-scope="scope">
{{ scope.row.nonceStr }}
</template>
</el-table-column>
<el-table-column label="物品编号" width="110">
<template slot-scope="scope">
{{ scope.row.objectId }}
</template>
</el-table-column>
<el-table-column label="物品类型编号" width="110">
<template slot-scope="scope">
{{ scope.row.objectTypeId }}
</template>
</el-table-column>
<el-table-column label="消费者编号" width="110">
<template slot-scope="scope">
{{ scope.row.openid }}
</template>
</el-table-column>
<el-table-column label="微信订单编号" width="110">
<template slot-scope="scope">
{{ scope.row.outTradeNo }}
</template>
</el-table-column>
<el-table-column label="结果码" width="110">
<template slot-scope="scope">
{{ scope.row.resultCode }}
</template>
</el-table-column>
<el-table-column label="返回码编号" width="110">
<template slot-scope="scope">
{{ scope.row.returnCode }}
</template>
</el-table-column>
<el-table-column label="返回消息" width="110">
<template slot-scope="scope">
{{ scope.row.returnMsg }}
</template>
</el-table-column>
<el-table-column label="子应用编号" width="110">
<template slot-scope="scope">
{{ scope.row.subAppid }}
</template>
</el-table-column>
<el-table-column label="子商户编号" width="110">
<template slot-scope="scope">
{{ scope.row.subMchId }}
</template>
</el-table-column>
<el-table-column label="交易类型" width="110">
<template slot-scope="scope">
{{ scope.row.tradeType }}
</template>
</el-table-column>
<el-table-column label="交易编号" width="110">
<template slot-scope="scope">
{{ scope.row.transactionId }}
</template>
</el-table-column>
<el-table-column label="签名" width="110">
<template slot-scope="scope">
{{ scope.row.sign }}
</template>
</el-table-column>
<el-table-column label="生成者" width="110">
<template slot-scope="scope">
{{ scope.row.createBy }}
</template>
</el-table-column>
<el-table-column label="更新更" width="110">
<template slot-scope="scope">
{{ scope.row.updateBy }}
</template>
</el-table-column>
<el-table-column label="生成时间" width="110">
<template slot-scope="scope">
{{ scope.row.createDate }}
</template>
</el-table-column>
<el-table-column label="更新时间" width="110">
<template slot-scope="scope">
{{ scope.row.updateDate }}
</template>
</el-table-column>
<el-table-column label="备注：1：现金，2：红包，3：积分" width="110">
<template slot-scope="scope">
{{ scope.row.remark }}
</template>
</el-table-column>

                <el-table-column align="center" prop="created_at" label="操作" width="200">
                    <template slot-scope="scope">
                        <span class="el-tag el-tag--info el-tag--mini" style="cursor: pointer;" @click="handleEdit(scope.$index, scope.row)">
                          {{ scope.row.isSet?'保存':"修改" }}
                        </span>
                        <span v-if="!scope.row.isSet" class="el-tag el-tag--danger el-tag--mini" style="cursor: pointer;" @click="handleDelete(scope.$index, scope.row)">
                          删除
                        </span>
                    </template>
                </el-table-column>
            </el-table>
        </div>

        <div class="block">
            <el-pagination
                    :current-page="currentPage"
                    :page-sizes="[10, 20, 30, 40]"
                    :page-size="pageSize"
                    layout="total, sizes, prev, pager, next, jumper"
                    :total="total"
                    @size-change="handleSizeChange"
                    @current-change="handleCurrentChange"
            />
        </div>

        <div class="block">
            <!--弹框-->
            <el-dialog :title="titleMap[dialogStatus]" :visible.sync="dialogFormVisible">
                <el-form :model="form">

                    <el-form-item v-if="addForVisible" label="角色Id">
                        <el-input v-model="form.id" auto-complete="off" />
                    </el-form-item>

                <el-form-item label="主键">
    <el-input v-model="form.id" placeholder="主键"  auto-complete="off"/>
</el-form-item>
                    <el-form-item label="关联订单">
    <el-input v-model="form.orderId" placeholder="关联订单"  auto-complete="off"/>
</el-form-item>
                    <el-form-item label="所属组织">
    <el-input v-model="form.organId" placeholder="所属组织"  auto-complete="off"/>
</el-form-item>
        <el-form-item label="应用编号">
    <el-input v-model="form.appId" placeholder="应用编号"  auto-complete="off"/>
</el-form-item>
                                <el-form-item label="商户编号">
    <el-input v-model="form.mchId" placeholder="商户编号"  auto-complete="off"/>
</el-form-item>
            <el-form-item label="订单生成时间">
    <el-date-picker v-model="form.createtTime" type="date" placeholder="订单生成时间">
    </el-date-picker>
</el-form-item>
                    <el-form-item label="订单结束时间">
    <el-date-picker v-model="form.timeEnd" type="date" placeholder="订单结束时间">
    </el-date-picker>
</el-form-item>
                        <el-form-item label="订单金额">
    <el-select v-model="form.amount" placeholder="订单金额">
        <el-option
                v-for="item in query.options"
                :key="item.value"
                :label="item.label"
                :value="item.value">
        </el-option>
    </el-select>
</el-form-item>
                    <el-form-item label="订单状态">
    <el-select v-model="form.status" placeholder="订单状态">
        <el-option
                v-for="item in query.options"
                :key="item.value"
                :label="item.label"
                :value="item.value">
        </el-option>
    </el-select>
</el-form-item>
            <el-form-item label="银行类型">
    <el-input v-model="form.bankType" placeholder="银行类型"  auto-complete="off"/>
</el-form-item>
                            <el-form-item label="现金金额">
    <el-select v-model="form.cachFee" placeholder="现金金额">
        <el-option
                v-for="item in query.options"
                :key="item.value"
                :label="item.label"
                :value="item.value">
        </el-option>
    </el-select>
</el-form-item>
            <el-form-item label="现金类型">
    <el-input v-model="form.cachFeeType" placeholder="现金类型"  auto-complete="off"/>
</el-form-item>
                            <el-form-item label="优惠券">
    <el-select v-model="form.couponCount" placeholder="优惠券">
        <el-option
                v-for="item in query.options"
                :key="item.value"
                :label="item.label"
                :value="item.value">
        </el-option>
    </el-select>
</el-form-item>
                    <el-form-item label="优惠券金额">
    <el-select v-model="form.couponFee" placeholder="优惠券金额">
        <el-option
                v-for="item in query.options"
                :key="item.value"
                :label="item.label"
                :value="item.value">
        </el-option>
    </el-select>
</el-form-item>
                    <el-form-item label="优惠券金额">
    <el-select v-model="form.couponFee0" placeholder="优惠券金额">
        <el-option
                v-for="item in query.options"
                :key="item.value"
                :label="item.label"
                :value="item.value">
        </el-option>
    </el-select>
</el-form-item>
                    <el-form-item label="优惠券金额">
    <el-select v-model="form.couponFee1" placeholder="优惠券金额">
        <el-option
                v-for="item in query.options"
                :key="item.value"
                :label="item.label"
                :value="item.value">
        </el-option>
    </el-select>
</el-form-item>
                    <el-form-item label="优惠券金额">
    <el-select v-model="form.couponFee2" placeholder="优惠券金额">
        <el-option
                v-for="item in query.options"
                :key="item.value"
                :label="item.label"
                :value="item.value">
        </el-option>
    </el-select>
</el-form-item>
            <el-form-item label="设备信息">
    <el-input v-model="form.deviceInfo" placeholder="设备信息"  auto-complete="off"/>
</el-form-item>
                    <el-form-item label="错误码描述">
    <el-input v-model="form.errCodeDes" placeholder="错误码描述"  auto-complete="off"/>
</el-form-item>
                    <el-form-item label="错误码">
    <el-input v-model="form.errCode" placeholder="错误码"  auto-complete="off"/>
</el-form-item>
                    <el-form-item label="费用类型">
    <el-input v-model="form.feeType" placeholder="费用类型"  auto-complete="off"/>
</el-form-item>
                    <el-form-item label="是否支付后关注">
    <el-input v-model="form.isSubscribe" placeholder="是否支付后关注"  auto-complete="off"/>
</el-form-item>
                    <el-form-item label="随机字串">
    <el-input v-model="form.nonceStr" placeholder="随机字串"  auto-complete="off"/>
</el-form-item>
                                <el-form-item label="物品编号">
    <el-input v-model="form.objectId" placeholder="物品编号"  auto-complete="off"/>
</el-form-item>
                    <el-form-item label="物品类型编号">
    <el-input v-model="form.objectTypeId" placeholder="物品类型编号"  auto-complete="off"/>
</el-form-item>
        <el-form-item label="消费者编号">
    <el-input v-model="form.openid" placeholder="消费者编号"  auto-complete="off"/>
</el-form-item>
                                <el-form-item label="微信订单编号">
    <el-input v-model="form.outTradeNo" placeholder="微信订单编号"  auto-complete="off"/>
</el-form-item>
        <el-form-item label="结果码">
    <el-input v-model="form.resultCode" placeholder="结果码"  auto-complete="off"/>
</el-form-item>
                    <el-form-item label="返回码编号">
    <el-input v-model="form.returnCode" placeholder="返回码编号"  auto-complete="off"/>
</el-form-item>
                    <el-form-item label="返回消息">
    <el-input v-model="form.returnMsg" placeholder="返回消息"  auto-complete="off"/>
</el-form-item>
                    <el-form-item label="子应用编号">
    <el-input v-model="form.subAppid" placeholder="子应用编号"  auto-complete="off"/>
</el-form-item>
                    <el-form-item label="子商户编号">
    <el-input v-model="form.subMchId" placeholder="子商户编号"  auto-complete="off"/>
</el-form-item>
                    <el-form-item label="交易类型">
    <el-input v-model="form.tradeType" placeholder="交易类型"  auto-complete="off"/>
</el-form-item>
                    <el-form-item label="交易编号">
    <el-input v-model="form.transactionId" placeholder="交易编号"  auto-complete="off"/>
</el-form-item>
                    <el-form-item label="签名">
    <el-input v-model="form.sign" placeholder="签名"  auto-complete="off"/>
</el-form-item>
                                <el-form-item label="生成者">
    <el-input v-model="form.createBy" placeholder="生成者"  auto-complete="off"/>
</el-form-item>
                    <el-form-item label="更新更">
    <el-input v-model="form.updateBy" placeholder="更新更"  auto-complete="off"/>
</el-form-item>
            <el-form-item label="生成时间">
    <el-date-picker v-model="form.createDate" type="date" placeholder="生成时间">
    </el-date-picker>
</el-form-item>
                    <el-form-item label="更新时间">
    <el-date-picker v-model="form.updateDate" type="date" placeholder="更新时间">
    </el-date-picker>
</el-form-item>
                <el-form-item label="备注：1：现金，2：红包，3：积分">
    <el-input v-model="form.remark" placeholder="备注：1：现金，2：红包，3：积分"  auto-complete="off"/>
</el-form-item>
                </el-form>

<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible = false">取 消</el-button>
<el-button type="primary" @click="handleEditSave">确 定</el-button>
</div>
</el-dialog>
</div></div>
    </div>

</template>

<script>
    import { getList, doDelete, doEdit } from '@/api/WeixinChargeOrderDetail/'
    export default {
        data() {
            return {
                list: null,
                listLoading: true,
                total: 5,
                currentPage: 1,
                pageSize: 10,
                dialogFormVisible: false,
                addForVisible: false,
                form: {
                                    id:'',
                                    orderId:'',
                                    organId:'',
                                    appId:'',
                                    mchId:'',
                                    createtTime:'',
                                    timeEnd:'',
                                    amount:'',
                                    status:'',
                                    bankType:'',
                                    cachFee:'',
                                    cachFeeType:'',
                                    couponCount:'',
                                    couponFee:'',
                                    couponFee0:'',
                                    couponFee1:'',
                                    couponFee2:'',
                                    deviceInfo:'',
                                    errCodeDes:'',
                                    errCode:'',
                                    feeType:'',
                                    isSubscribe:'',
                                    nonceStr:'',
                                    objectId:'',
                                    objectTypeId:'',
                                    openid:'',
                                    outTradeNo:'',
                                    resultCode:'',
                                    returnCode:'',
                                    returnMsg:'',
                                    subAppid:'',
                                    subMchId:'',
                                    tradeType:'',
                                    transactionId:'',
                                    sign:'',
                                    createBy:'',
                                    updateBy:'',
                                    createDate:'',
                                    updateDate:'',
                                    remark:''
                },
                // 新增or编辑弹框标题(根据点击的新增or编辑按钮显示不同的标题)
                titleMap: {
                    add: '新增',
                    edit: '编辑'
                },
                // 新增和编辑弹框标题
                dialogStatus: '',
                query: {
                    params: {
                        id:'',
                        orderId:'',
                        organId:'',
                        appId:'',
                        mchId:'',
                        createtTime:'',
                        timeEnd:'',
                        amount:'',
                        status:'',
                        bankType:'',
                        cachFee:'',
                        cachFeeType:'',
                        couponCount:'',
                        couponFee:'',
                        couponFee0:'',
                        couponFee1:'',
                        couponFee2:'',
                        deviceInfo:'',
                        errCodeDes:'',
                        errCode:'',
                        feeType:'',
                        isSubscribe:'',
                        nonceStr:'',
                        objectId:'',
                        objectTypeId:'',
                        openid:'',
                        outTradeNo:'',
                        resultCode:'',
                        returnCode:'',
                        returnMsg:'',
                        subAppid:'',
                        subMchId:'',
                        tradeType:'',
                        transactionId:'',
                        sign:'',
                        createBy:'',
                        updateBy:'',
                        createDate:'',
                        updateDate:'',
                        remark:''
                    },
                    timeValue: '',
                    options: [{
                        value: '1',
                        label: '黄金糕'
                    }, {
                        value: '2',
                        label: '双皮奶'
                    }],
                    value: ''
                }
            }
        },
        created() {
            this.fetchData()
        },
        methods: {
            fetchData() {
                this.listLoading = true
                getList(this.query.params , this.currentPage, this.pageSize).then(response => {
                    const data = response.data
                    this.total = data.totalCount
                this.pageSize = data.pageSize
                this.currentPage = data.currentPage
                this.list = data.entities
                this.listLoading = false
            })
            },
            handleSizeChange(val) {
                this.currentPage = 1
                this.pageSize = val
            },
            handleCurrentChange(val) {
                this.currentPage = val
            },
            // 新增
            handleAdd() {
                // 显示弹框
                this.dialogFormVisible = true
                // 新增弹框标题
                this.dialogStatus = 'add'

                                    this.form.id=''
                                    this.form.orderId=''
                                    this.form.organId=''
                                    this.form.appId=''
                                    this.form.mchId=''
                                    this.form.createtTime=''
                                    this.form.timeEnd=''
                                    this.form.amount=''
                                    this.form.status=''
                                    this.form.bankType=''
                                    this.form.cachFee=''
                                    this.form.cachFeeType=''
                                    this.form.couponCount=''
                                    this.form.couponFee=''
                                    this.form.couponFee0=''
                                    this.form.couponFee1=''
                                    this.form.couponFee2=''
                                    this.form.deviceInfo=''
                                    this.form.errCodeDes=''
                                    this.form.errCode=''
                                    this.form.feeType=''
                                    this.form.isSubscribe=''
                                    this.form.nonceStr=''
                                    this.form.objectId=''
                                    this.form.objectTypeId=''
                                    this.form.openid=''
                                    this.form.outTradeNo=''
                                    this.form.resultCode=''
                                    this.form.returnCode=''
                                    this.form.returnMsg=''
                                    this.form.subAppid=''
                                    this.form.subMchId=''
                                    this.form.tradeType=''
                                    this.form.transactionId=''
                                    this.form.sign=''
                                    this.form.createBy=''
                                    this.form.updateBy=''
                                    this.form.createDate=''
                                    this.form.updateDate=''
                                    this.form.remark=''
                                this.addForVisible = false
            },
            // 编辑
            handleEdit(index, row) {
                console.log(index)
                console.log(row)
                                this.form.id=row.id
                                this.form.orderId=row.orderId
                                this.form.organId=row.organId
                                this.form.appId=row.appId
                                this.form.mchId=row.mchId
                                this.form.createtTime=row.createtTime
                                this.form.timeEnd=row.timeEnd
                                this.form.amount=row.amount
                                this.form.status=row.status
                                this.form.bankType=row.bankType
                                this.form.cachFee=row.cachFee
                                this.form.cachFeeType=row.cachFeeType
                                this.form.couponCount=row.couponCount
                                this.form.couponFee=row.couponFee
                                this.form.couponFee0=row.couponFee0
                                this.form.couponFee1=row.couponFee1
                                this.form.couponFee2=row.couponFee2
                                this.form.deviceInfo=row.deviceInfo
                                this.form.errCodeDes=row.errCodeDes
                                this.form.errCode=row.errCode
                                this.form.feeType=row.feeType
                                this.form.isSubscribe=row.isSubscribe
                                this.form.nonceStr=row.nonceStr
                                this.form.objectId=row.objectId
                                this.form.objectTypeId=row.objectTypeId
                                this.form.openid=row.openid
                                this.form.outTradeNo=row.outTradeNo
                                this.form.resultCode=row.resultCode
                                this.form.returnCode=row.returnCode
                                this.form.returnMsg=row.returnMsg
                                this.form.subAppid=row.subAppid
                                this.form.subMchId=row.subMchId
                                this.form.tradeType=row.tradeType
                                this.form.transactionId=row.transactionId
                                this.form.sign=row.sign
                                this.form.createBy=row.createBy
                                this.form.updateBy=row.updateBy
                                this.form.createDate=row.createDate
                                this.form.updateDate=row.updateDate
                                this.form.remark=row.remark
                                this.addForVisible = true
                // 显示弹框
                this.dialogFormVisible = true
                // 编辑弹框标题
                this.dialogStatus = 'edit'
            },
            handleDelete(index, row) {
                console.log(index)
                console.log(row)

                this.$confirm('此操作将永久删除该记录, 是否继续?', '提示', {
                    confirmButtonText: '确定',
                    cancelButtonText: '取消',
                    type: 'warning',
                    center: true
                }).then(() => {
                    doDelete(row.id).then(response => {
                    const data = response.data
                    console.log(data)
                    if(data.status == 1){
                        this.$message({
                            type: 'success',
                            message: '操作成功!'
                        })
                        this.fetchData();
                    }else if(data.status == 403){
                        this.$message({
                            type: 'warning',
                            message: data.description
                        })
                }else{
                    this.$message({
                        type: 'info',
                        message: '操作失败!'
                    })
                }
            })
            }).catch(() => {
                    this.$message({
                    type: 'info',
                    message: '已取消删除'
                })
            })
            },
            handleEditSave() {
                debugger

                doEdit(this.form).then(response => {
                    debugger
                            console.log(response)
                    const data = response.data
                    if(data.status){
                        this.$message({
                            type: 'success',
                            message: '操作成功!'
                        })
                     this.fetchData();
                    }else{
                        this.$message({
                            type: 'info',
                            message: '操作失败!'
                        })
                    }
                    this.listLoading = false
                    this.dialogFormVisible = false
            })
            },
            handleReset() {
                this.$confirm('此操作将永久删除该记录, 是否继续?', '提示', {
                    confirmButtonText: '确定',
                    cancelButtonText: '取消',
                    type: 'warning',
                    center: true
                }).then(() => {
                    this.$message({
                    type: 'success',
                    message: '删除成功!'
                })
            }).catch(() => {
                    this.$message({
                    type: 'info',
                    message: '已取消删除'
                })
            })
            }
        }
    }
</script>
